package com.sq.partner.manager.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.web.multipart.MultipartFile;

import com.sq.partner.manager.common.Result;
import com.sq.partner.manager.common.exception.AppException;
import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.mybatis.model.FacadeUser;
import com.sq.partner.manager.mybatis.model.GatewaySubChannel;
import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.TradAgentInfo;
import com.sq.partner.manager.mybatis.model.TradSaleAgent;
import com.sq.partner.manager.util.Page;

/**
 * @author zzguo
 * */

public interface IGatewayAgentInfoMtService {

	public Page<TradAgentInfo> queryInfoByCriteria(Page<TradAgentInfo> page,GatewayUser user) throws Exception;
	
	public boolean addAgentMtInfo(TradAgentInfo agent) throws Exception;

	public boolean updateAgentMtInfo(TradAgentInfo agent) throws Exception;
	
	public boolean deleteAgentMtInfo(TradAgentInfo agent) throws Exception;
	
	public Page<GatewaySubChannel> queryPageForGatewaySubChannelInfo(Page<GatewaySubChannel> page) throws Exception;
	
	public TradAgentInfo queryAgentInfoByCode(TradAgentInfo agent) throws Exception;
	
	public int checkIsExistConfigPlanInfo(Long agentId) throws Exception;
	
	List<InputStream> getFileInputStream(MultipartFile[] myfiles) throws AppException;
	
	void insertFinalPassDataToDB(InputStream inputStream,GatewayUser user,String agentType,HttpSession session) throws Exception;
	/**费用跟单列表查询*/
	public List<TradSaleAgent> queryTrandSaleAgent(String id) throws Exception;
	
	/**删除*/
	public void deleteTrade(String id)throws Exception ;
	/**新增*/
	public boolean addTrade(List<TradSaleAgent> saleAgents)throws Exception ;
	Result saveAgentMtInfo(String flag, String agentType,
			String userCode, String channelCode, String subChannelCode,
			String dptCde, String agentNo, String protocolNo,
			String serviceCode,String serviceName, String empNo,String empName, String teamCode, String teamName,
			String userName, String cardApplicant,String channleCode,
			String channleType,String newBsnsType,String categoryCode,
			String zone,String organization,String branch,String branchName,Long id,GatewayUser user,String cbrkrname,String coprcod,String key1,String key2,String key3,String key4,String key5
			,String unionType) throws Exception;
	
	/**
	 * 分页查询出单机构
	 * @param page
	 * @return
	 * @throws Exception
	 */
	Page<CoreDept> queryPageForCoreDept(Page<CoreDept> page,String partnerNo,String agentType , GatewayUser gatewayuser) throws Exception;
	
	public void deleteTradAgentInfoRela(String id) throws Exception;

}
